#version 320 es
#ifdef GL_ES
	precision highp float;
#endif
out vec4 FragColor;

in float posZ;

struct Arrow {
	float zStart;
	float zEnd;
};
uniform Arrow arrow;

uniform vec4 color;

void main() {
	float t = (arrow.zStart - posZ) / (arrow.zStart - arrow.zEnd);

	FragColor = vec4(color.rgb, color.a * (1.0 - t));
}